package com.woniu34.search.domain;

import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;
import org.springframework.stereotype.Indexed;

@Document(indexName = "cinema",type = "cinemadocs",shards = 3,replicas = 1)
public class CinemaSearch {


    /** 电影院id */
    @Id
    @Field(index = false,type = FieldType.Long)
    private Long cinemaId;

    /** 电影院名称 */
    @Field(index = true,analyzer = "ik_max_word",type = FieldType.Text)
    private String cinemaName;

    /** 详细地址 */
    @Field(index = false,type = FieldType.Keyword)
    private String cinemaLocation;


    public Long getCinemaId() {
        return cinemaId;
    }

    public void setCinemaId(Long cinemaId) {
        this.cinemaId = cinemaId;
    }

    public String getCinemaName() {
        return cinemaName;
    }

    public void setCinemaName(String cinemaName) {
        this.cinemaName = cinemaName;
    }

    public String getCinemaLocation() {
        return cinemaLocation;
    }

    public void setCinemaLocation(String cinemaLocation) {
        this.cinemaLocation = cinemaLocation;
    }


    @Override
    public String toString() {
        return "CinemaSearch{" +
                "cinemaId=" + cinemaId +
                ", cinemaName='" + cinemaName + '\'' +
                ", cinemaLocation='" + cinemaLocation + '\'' +
                '}';
    }
}
